.class public Lde/dealdoktor/app/data/CategoriesDAO;
.super Ljava/lang/Object;
.source "CategoriesDAO.java"


# instance fields
.field public id:I

.field public selected:Z

.field public subCategories:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lde/dealdoktor/app/data/CategoriesDAO;",
            ">;"
        }
    .end annotation
.end field

.field public subtitle:Ljava/lang/String;

.field public title:Ljava/lang/String;


# direct methods
.method public constructor <init>(ILjava/lang/String;Ljava/lang/String;Z)V
    .locals 1
    .parameter "id"
    .parameter "title"
    .parameter "subtitle"
    .parameter "selected"

    .prologue
    .line 17
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 18
    iput p1, p0, Lde/dealdoktor/app/data/CategoriesDAO;->id:I

    .line 19
    iput-object p2, p0, Lde/dealdoktor/app/data/CategoriesDAO;->title:Ljava/lang/String;

    .line 20
    iput-object p3, p0, Lde/dealdoktor/app/data/CategoriesDAO;->subtitle:Ljava/lang/String;

    .line 21
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lde/dealdoktor/app/data/CategoriesDAO;->subCategories:Ljava/util/ArrayList;

    .line 22
    iput-boolean p4, p0, Lde/dealdoktor/app/data/CategoriesDAO;->selected:Z

    .line 23
    return-void
.end method


# virtual methods
.method public setSelected()V
    .locals 3

    .prologue
    .line 33
    const/4 v1, 0x1

    iput-boolean v1, p0, Lde/dealdoktor/app/data/CategoriesDAO;->selected:Z

    .line 34
    iget-object v1, p0, Lde/dealdoktor/app/data/CategoriesDAO;->subCategories:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-nez v2, :cond_0

    .line 37
    return-void

    .line 34
    :cond_0
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lde/dealdoktor/app/data/CategoriesDAO;

    .line 35
    .local v0, category:Lde/dealdoktor/app/data/CategoriesDAO;
    invoke-virtual {v0}, Lde/dealdoktor/app/data/CategoriesDAO;->setSelected()V

    goto :goto_0
.end method

.method public setUnselected()V
    .locals 3

    .prologue
    .line 26
    const/4 v1, 0x0

    iput-boolean v1, p0, Lde/dealdoktor/app/data/CategoriesDAO;->selected:Z

    .line 27
    iget-object v1, p0, Lde/dealdoktor/app/data/CategoriesDAO;->subCategories:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-nez v2, :cond_0

    .line 30
    return-void

    .line 27
    :cond_0
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lde/dealdoktor/app/data/CategoriesDAO;

    .line 28
    .local v0, category:Lde/dealdoktor/app/data/CategoriesDAO;
    invoke-virtual {v0}, Lde/dealdoktor/app/data/CategoriesDAO;->setUnselected()V

    goto :goto_0
.end method
